#ifndef SCENELOADER_H_
#define SCENELOADER_H_

#include "tinyxml.h"
#include "View.h"
#include "Illumination.h"
#include "Light.h"
#include "Texture.h"
#include "Material.h"
#include "Transformation.h"
#include "Primitive.h"
#include "Component.h"

#include <string>
#include <map>


class SceneLoader{
private:
	map<string, View*> viewsMap;
	map<string, Light*> lightMap;
	map<string, Texture*> textureMap;
	map<string, Material*> materialMap;
	map<string, Transformation*> transformationMap;
	map<string, Primitive*> primitiveMap;
	map<string, Component*> componentMap;

public:
	TiXmlDocument doc;
	TiXmlElement *root;
	
	TiXmlElement* viewElement;
	TiXmlElement* illuminationElement;
	TiXmlElement* lightElement;
	TiXmlElement* textureElement;
	TiXmlElement* materialElement;
	TiXmlElement* transformationElement;
	TiXmlElement* primitiveElement;
	TiXmlElement* componentElement;

	SceneLoader(const char * fileName);
	bool loadScene();
	void loadViews();
	void loadIllumination();
	void loadLights();
	void loadTextures();
	void loadMaterials();
	void loadTransformations();
	void loadPrimitives();
	void loadComponents();
};
#endif